// Padding on the left and right side of the button.
const SIDE_PADDING = 14;
-function Button(widget, buttonColor, pressedButtonColor, textColor, staysPressed, minWidth, minHeight, font) {
- this._init(widget, buttonColor, pressedButtonColor, textColor, staysPressed, minWidth, minHeight, font);
+function Button(widget, buttonColor, pressedButtonColor, textColor, staysPressed, font) {
+ this._init(widget, buttonColor, pressedButtonColor, textColor, staysPressed, font);
}
Button.prototype = {
- _init : function(widgetOrText, buttonColor, pressedButtonColor, textColor, staysPressed, minWidth, minHeight, font) {
+ _init : function(widgetOrText, buttonColor, pressedButtonColor, textColor, staysPressed, font) {
let me = this;
this._buttonColor = buttonColor
if (font == null)
this._font = DEFAULT_FONT;
- if (minWidth == null)
- minWidth = 0;
- if (minHeight == null)
- minHeight = 0;
-
// if this._staysPressed is true, this._active will be true past the first release of a button, until a subsequent one (the button
// is unpressed) or until release() is called explicitly
this._active = false;
this.button.append(this._widget, Big.BoxPackFlags.EXPAND);
- this._minWidth = minWidth;
- this._minHeight = minHeight;
-
this.button.connect('button-press-event',
function(o, event) {
me._isBetweenPressAndRelease = true;
/* left side */
this.button = new Button.Button("Activities", PANEL_BUTTON_COLOR, PRESSED_BUTTON_BACKGROUND_COLOR,
- PANEL_FOREGROUND_COLOR, true, null, PANEL_HEIGHT, DEFAULT_FONT);
+ PANEL_FOREGROUND_COLOR, true, DEFAULT_FONT);
+ this.button.button.height = PANEL_HEIGHT;
this._leftBox.append(this.button.button, Big.BoxPackFlags.NONE);
PANEL_BUTTON_COLOR,
PRESSED_BUTTON_BACKGROUND_COLOR,
PANEL_FOREGROUND_COLOR,
- true, null, PANEL_HEIGHT);
+ true);
+ statusbutton.button.height = PANEL_HEIGHT;
statusbutton.button.connect('button-press-event', function (b, e) {
statusmenu.toggle(e);
return false;